<?php

Yii::import('zii.widgets.CPortlet');

class PicturesNews extends CPortlet
{
	
	public $newsModel;
    
    public $type;

    public $ms;

    public $height;

	public function init()
	{
        if($this->height == null)
        {
            $this->height = 250;
        }
        /**
         * sent the news date to the view
         * @author : nonglei
         * @date   : 14/03/2014
         */
        $this->newsModel = News::model()->getNewsModelByNewsType($this->type);
        $this->contentCssClass="pictureNewsBox";
		$cs = Yii::app()->getClientScript();
        $cs->registerCssFile(Yii::app()->baseUrl.'/css/picturesnews.css');
	//	$cs->registerScriptFile(Yii::app()->baseUrl.'/js/picturesnews.js');
        parent::init();
	}
	protected function renderContent()
	{
		$this->render('picturesnews');
	}
}

?>
